<span id="header1">
<html>
	<head>
		<title>C# Coding Style Guide</title>
    <link rel="stylesheet" href="/Forums/skins/default/style/default.css" type="text/css" />
		<meta name="description" content="Learn the c# langauge to build web applications using our online tutorials with live demos.  Participate in our forums and learn from others.">
		<meta name="keywords" content="C#, C Sharp, visual studio, visual studio .NET, .NET, ASP.NET, tutorials, dotnet, repeater, datagrid, webforms,programming language, programming languages">
		<meta name="copyright" content="2002-2006">
		<meta name="robots" content="all">
		<link rel="icon" href="/csharpfriends.ico" type="image/x-icon" />
		<style type="text/css"> <!-- .serif { font-family: serif,verdana,arial; font-size: small; }
.sans { font-family: verdana,arial,helvetica,sans-serif; font-size: small; }
.small { font-family: verdana,arial,helvetica,sans-serif; font-size: x-small; }
.h1 { font-family: verdana,arial,helvetica,sans-serif; color: #CC6600; font-size: small; }
.h3color { font-family: verdana,arial,helvetica,sans-serif; color: #CC6600; font-size: x-small; }
.tiny { font-family: verdana,arial,helvetica,sans-serif; font-size: xx-small; }
.listprice { font-family: arial,verdana,sans-serif; text-decoration: line-through; font-size: x-small; }
.price { font-family: verdana,arial,helvetica,sans-serif; color: #990000; font-size: x-small; }

.caption
{
    FONT-WEIGHT: normal;
    FONT-SIZE: 9px;
    COLOR: #000000;
    FONT-FAMILY: Verdana, arial, sans
}
.codefg
{
    PADDING-RIGHT: 0px;
    PADDING-LEFT: 0px;
    BACKGROUND: #ffffcc;
    PADDING-BOTTOM: 2px;
    MARGIN: 0px 0px 0px 0px;
    FONT: 80% Courier New, monospace;
    COLOR: #000000;    
    PADDING-TOP: 2px    
}

/* new article styels sept30/2003 */

.note
{
	background-color: #ffffdd;
	font-size: 10pt;
}
.noteTitle
{
	font-weight: bold;
	text-align: center;
}

a {	text-decoration: underline } a:hover { 	color: #ff0000;	background: #ffff00;	text-decoration: underline;}

--></style>
	</head>
	<html>
		<body bgcolor="#FFFFFF" link="#003399" alink="#FF9933" vlink="#996633" text="#000000"
			topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">
			<a name="top"></a>
			<table border="0" cellpadding="2" cellspacing="0" width="100%">
				<tr valign="top">
					<td align="left" width="1%"><a href="http://www.csharpfriends.com"><img src="http://www.csharpfriends.com/images/csharp_logo2.gif" align="left" width="160" height="39"
								border="0" hspace="7" vspace="0" alt="http://www.csharpfriends.com" title="http://www.csharpfriends.com"></a></td>
					<td align="left">
						<table border="0" cellpadding="2" cellspacing="0">
							<tr>
								<td>
									<!--  Ad Serving by - http://www.idealadserver.com  -->
									<script language="JavaScript" type="text/javascript">
<!--

var oCp = parent.location.href;
var dtBrowser = (new Date()).getTime();

document.write('<iframe name="IdealAdServer_frame" width="468" height="60" frameborder="0" src="http://www.csharpfriends.com/IdealAdServer/IdealAdServer.aspx?pid=2&zid=7&a=1&ocp=' + oCp + '&' + dtBrowser +'" marginwidth="0"	marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"></iframe>');
 
 

// --> 
									</script>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<table border="0" cellpadding="2" cellspacing="0" width="100%">
				<tr>
					<td bgcolor="#7755AA" colspan="3">
						<table border="0" cellpadding="2" cellspacing="0" width="100%">
							<tr>
								<td width="100%"><b><font color="#ffffff">World's Greatest C# Community</font></b></td>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#eeeeee" class="cssNavBar">
				<tr>
					<td>
						<table border="0" cellpadding="4" cellspacing="0">
							<tr>
								<td bgcolor="#CCCCCC"><font size="2" color="#999999"><a href="http://www.csharpfriends.com">Home</a></font></td>
								<td><span class="abc"></span></td>
								<td><font size="2" color="#999999"><a href="http://www.csharpfriends.com/Members/Main/Tutorials/" class="cssNavLink">Articles</a></font></td>
								<td><span class="abc"></span></td>
								<td><font size="2" color="#999999"><a href="http://www.csharpfriends.com/Forums/ShowForum.aspx?ForumID=1" class="cssNavLink">C# 
											Forums</a></font></td>
								<td><span class="abc"></span></td>
								<td><font size="2" color="#999999"><a href="http://www.csharpfriends.com/Books/" class="cssNavLink">Books</a></font></td>
								<td><span class="abc"></span></td>
								<td><font size="2" color="#999999"><a href="http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=16" class="cssNavLink">C# 
											Syntax</a></font></td>
								<td><span class="abc"></span></td>
								<td><font size="2" color="#999999"><a href="http://www.csharpfriends.com/Spec/index.aspx?specID=toc.htm" class="cssNavLink">C# 
											Spec</a></font></td>
								<td><span class="abc"></span></td>
								<td><font size="2" color="#999999"><a href="http://www.csharpfriends.com/Forums/ShowPost.aspx?PostID=60388" class="cssNavLink">C# Jobs</a></font></td>
								<td><span class="abc"></span></td>
								<td><font size="2" color="#999999"><a href="http://www.csharpfriends.com/SourceCode/" class="cssNavLink"><font color="red">free</font>
											Source Code</a></font></td>
								<td><span class="abc"></span></td>
								<td><font size="2" color="#999999"><a href="http://www.csharpfriends.com/Members/Main/Misc/advertise.aspx" class="cssNavLink">Advertise</a></font></td>
								<td><span class="abc"></span></td>
								<td><font size="2" color="#999999"><a href="http://www.csharpfriends.com/Members/Main/Misc/about.aspx" class="cssNavLink">About</a></font></td>
							</tr>
						</table>
					</td>
					<td align="right"><a href="http://www.csharpfriends.com/Forums/User/WhosOnline.aspx">
							<img src="http://www.csharpfriends.com/Members/images/whosonline.gif" border=0></a>&nbsp;</td>
				</tr>
			</table>
			<p align="center"><script type="text/javascript"><!--
google_ad_client = "pub-0076865331555287";
google_ad_width = 728;
google_ad_height = 15;
google_ad_format = "728x15_0ads_al";
google_ad_channel ="0260987187";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0033CC";
google_color_url = "000000";
google_color_text = "000000";
//--></script>
				<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
				</script>
			</p>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
				<tr valign="top">
					<td width="134">
						<TABLE border="0" cellspacing="0" cellpadding="0">
							<TR valign="bottom" align="center">
								<td><img src="http://www.csharpfriends.com/images/controlpanel.gif" width="131" height="19" border="0" alt="Control Panel"></td>
							</TR>
							<TR valign="top" align="center">
								<TD>
									<TABLE border="0" width="131" cellpadding="1" cellspacing="0" bgcolor="#708090">
										<TR>
											<TD width="100%"><TABLE width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#708090">
													<TR>
														<TD bgcolor="#ffffff" valign="top" width="100%">
															<table cellpadding="3" cellspacing="0">
																<tr>
																	<td class="small">
																		<font size="1" face="arial" color="#000000">
																			<br>
																			<span id="header1__ctl0_areaLoggedOut">
																			[ <a href="http://www.csharpfriends.com/Forums/login.aspx">Sign In</a> / <a href="http://www.csharpfriends.com/Forums/User/CreateUser.aspx">
																					register</a> ]</span>
																			
																		</font>
																		<span class="tiny">
																			<font color="#003399">Points&nbsp;&nbsp;&nbsp;
																				<br>
																				<a href="http://www.csharpfriends.com/Members/Main/Notes/">Notes</a>&nbsp;
																				<br>
																				<a href="http://www.csharpfriends.com/Forums/User/MyForums.aspx">My 
																					Forums</a>
																				<br>
																				<a href="http://www.csharpfriends.com/Members/Main/Tutorials/myTutorials.aspx">
																					My Tutorials</a>
																				<br>
																				<a href="http://www.csharpfriends.com/Forums/User/EditUserProfile.aspx">
																					My Profile</a> </font>
																		</span>
																	</td>
																</tr>
															</table>
														</TD>
													</TR>
												</TABLE>
											</TD>
										</TR>
									</TABLE>
								</TD>
							</TR>
						</TABLE>
						<br clear="all">
						<TABLE border="0" cellspacing="0" cellpadding="0">
							<TR valign="bottom" align="center">
								<td><img src="http://www.csharpfriends.com/images/resources.gif" width="131" height="19" border="0" alt="Resources"></td>
							</TR>
							<TR valign="top" align="center">
								<TD>
									<TABLE border="0" width="131" cellpadding="1" cellspacing="0" bgcolor="#708090">
										<TR>
											<TD width="100%"><TABLE width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#708090">
													<TR>
														<TD bgcolor="#ffffff" valign="top" width="100%">
															<table cellpadding="3" cellspacing="0">
																<tr>
																	<td class="small"><br>
																		<font color="#CC6600"><b>Learn</b></font></td>
																</tr>
																<tr>
																	<td class="small"><span class="tiny"><font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/Members/Main/Tutorials/">Articles</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/quickstart/aspplus/">QuickStarts</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/Spec/index.aspx?specID=toc.htm">C# 
																			Spec</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/statics/whitepapers.aspx">Whitepapers</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/statics/tools.aspx">Tools</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/quickstart/aspplus/samples/classbrowser/cs/classbrowser.aspx">Class 
																			Browser</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/demos/csharp_class_generator.aspx">C# 
																			Code Generator</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/statics/links.aspx">Links</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/News/DevRssFeeds.aspx">Misc 
																			Rss Feeds</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/Demos/color_code.aspx">Code 
																			Highlight</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://csharpfriends.411asp.net">411 
																			Directory</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://csharpfriends.tradepub.com">FREE 
																			magazines</a>
																		<br>
																		<span class="tiny">
																			<font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.freevb.net">freevb.net</a>
																	</td>
																</tr>
																<tr>
																	<td class="small"><br>
																		<font color="#CC6600"><b>Reviews</b></font></td>
																</tr>
																<tr>
																	<td class="small"><font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/statics/hosting.aspx">
																			ASP.NET Hosting</a>
																		<br>
																	</td>
																</tr>
																<tr>
																	<td class="small"><br>
																		<font color="#CC6600"><b>Source Code</b></font></td>
																</tr>
																<tr>
																	<td class="small"><span class="tiny"><font color="#003399">&#149;</font></span>&nbsp;<a href="http://www.csharpfriends.com/SourceCode/">Get 
																			Version 1.0</a>
																		<br>
																	</td>
																</tr>
															</table>
														</TD>
													</TR>
												</TABLE>
											</TD>
										</TR>
									</TABLE>
								</TD>
							</TR>
						</TABLE>
						<p align="center">
							<!--  Ad Serving by - http://www.idealadserver.com  --><script language="JavaScript" type="text/javascript">
<!--

var oCp = parent.location.href;
var dtBrowser = (new Date()).getTime();

document.write('<iframe name="IdealAdServer_frame" width="120" height="600" frameborder="0" src="http://www.csharpfriends.com/IdealAdServer/IdealAdServer.aspx?pid=2&zid=6&a=1&ocp=' + oCp + '&' + dtBrowser +'" marginwidth="0"	marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"></iframe>');
 
 

// --> 
							</script>
							</script>
						</p>
						<br />						
						<br />
						<font face="arial" color="black" size="-2"><a href='http://www.csharpfriends.com/statics/consulting.aspx' title='C# Consulting'>
								C# Consulting</a></font>
						<br />
						<font face="arial" color="black" size="-2"><a href="http://www.sqlserverfriends.com">sql server forums</a></font>
						<br />
						
					</td>
<!-- /sarr --></span>
<LINK href="http://www.csharpfriends.com/Members/style/code.css" type="text/css" rel="stylesheet">
	<!-- CONTENT -->
	<td width="100%" valign="top" align="left">
		<form name="Form1" method="post" action="getArticle.aspx?articleID=336" id="Form1">
<input type="hidden" name="__VIEWSTATE" value="dDwtMTI2ODMxMTM2Mzs7Ps/i6wL6dNKHkNF6g1j7rOn0yf+s" />

			<span id="Article1">
<!-- toc -->
<table width="100%">
	<tr bgcolor="#ffffee">
		<td align="center" width="50%"><font face="verdana" size="2">Chapter: &nbsp;
				<a href="http://www.csharpfriends.com/Articles/getbycat.aspx?catID=36">Style & Naming Conventions</a><br>
				Current Lesson:<br>
				<b>
					C# Coding Style Guide</b></font></td>
		<td width="50%"><font face="verdana" size="2">[<A href="http://www.csharpfriends.com/Members/Main/Tutorials/">Latest 
					Content</A>]<br>
				<span id="Showallusers1__ctl0_AlphaPicker">
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=A">A</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=B">B</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=C">C</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=D">D</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=E">E</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=F">F</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=G">G</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=H">H</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=I">I</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=J">J</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=K">K</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=L">L</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=M">M</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=N">N</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=O">O</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=P">P</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=Q">Q</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=R">R</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=S">S</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=T">T</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=U">U</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=V">V</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=W">W</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=X">X</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=Y">Y</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=Z">Z</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="http://www.csharpfriends.com/Articles/GetAllArticles.aspx">
						ALL</a><span class="normalTextSmallBold"></span>
				</span></font></td>
	</tr>
	<tr bgcolor="#eeeeee">
		<td width="50%"><font face="verdana" size="2"><A href="http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=335">[prev. Lesson]&nbsp;&nbsp;Creating GUIDs in c#</a></font></td>
		<td width="50%"><font face="verdana" size="2"><A href="http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=344">[next Lesson]&nbsp;&nbsp;Password Hashing using C#</a></font></td>
	</tr>
</table>
<!-- end toc -->
<table border="0" width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td><b class="h1"><span id="Article1__ctl0_title">C# Coding Style Guide</span></b><br>
			<span class="serif">
				<b>&nbsp;&nbsp;by:&nbsp;<a id="Article1__ctl0_username" href="/Forums/User/UserProfile.aspx?UserName=Salman Ahmed">Salman Ahmed</a></b></span><br>
			<br>
		</td>
	</tr>
	<tr>
		<td><span class="serif">
				<table align="right" border="0">
					<tr>
						<td><script type="text/javascript"> 
<!-- 
lqm_channel=1;
lqm_publisher=240;
lqm_zone=1;
lqm_format=7;
//-->
</script>
<script type="text/javascript" src="http://a.lakequincy.com/s.js"></script></td>
					</tr>
				</table>
				<DIV id="intelliTxt">
				
<h1>Technotes, HowTo Series</h1>
<h1><b>C# Coding Style Guide</b></h1>
<p>Version 0.3<br>
by Mike Krüger <a href="http://www.icsharpcode.net">icsharpcode.net</a><br>
<br>
<ol>
<li><a href="#1">About the C# Coding Style Guide</a>...................................................................................1</li>
<li><a href="#2">File Organization</a>.............................................................................................................1</li>
<li><a href="#3">Indentation</a>......................................................................................................................2</li>
<li><a href="#4">Comments</a>......................................................................................................................3</li>
<li><a href="#5">Declarations</a>....................................................................................................................4</li>
<li><a href="#6">Statements</a>......................................................................................................................5</li>
<li><a href="#7">White Space</a>...................................................................................................................7</li>
<li><a href="#8">Naming Conventions</a>.......................................................................................................9</li>
<li><a href="#9">Programming Practices</a>...................................................................................................11</li>
<li><a href="#10">Code Examples</a>..............................................................................................................12</li>
</ol>


<a name="1"></a><h1>1.  About the C# Coding Style Guide</h1>
<p>
This document may be read as a guide to writing robust and reliable programs. It focuses on programs
written in C#, but many of the rules and principles are useful even if you write in another programming
language.
</p>
<a name="2"></a><h1>2. File Organization</h1>
<h3>2.1 C# Sourcefiles</h3>
<p>
Keep your classes/files short, don't exceed 2000 LOC, divide your code up, make structures clearer. Put
every class in a separate file and name the file like the class name (with .cs as extension of course). This
convention makes things much easier.
</p>
<h3>2.2 Directory Layout</h3>
<p>
Create a directory for every namespace. (For MyProject.TestSuite.TestTier use
MyProject/TestSuite/TestTier as the path, do not use the namespace name with dots.) This
makes it easier to map namespaces to the directory layout.
</p>
<a name="3"></a><h1>3.  Indentation</h1>
<h3>3.1 Wrapping Lines</h3>
<p>
When an expression will not fit on a single line, break it up according to these general principles:
<li>Break after a comma.
<li>Break after an operator.
<li>Prefer higher-level breaks to lower-level breaks.
<li>Align the new line with the beginning of the expression at the same level on the previous
line
<p>
Example of breaking up method calls:
</p>
<code>
longMethodCall(expr1, expr2,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;expr3, expr4, expr5);
</code>
<p>Examples of breaking an arithmetic expression:<br>
</p>
<code>
PREFER:<br><br>
var = a * b / (c - g + f) +<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4 * z;<br><br>
BAD STYLE – AVOID:<br><br>
var = a * b / (c - g +<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;f) + 4 * z;
</code>
<p>
The first is preferred, since the break occurs outside the paranthesized expression (higher level rule). Note
that you indent with tabs to the indentation level and then with spaces to the breaking position in our
example this would be:
</p>
<pre><code>
> var = a * b / (c - g + f) +
> ......4 * z;
</code>
</pre>
<p>
Where '>' are tab chars and '.' are spaces. (the spaces after the tab char are the indent with of the tab). A good
coding practice is to make the tab and space chars visible in the editor which is used.
</p>
<h3>3.2 White Spaces</h3>
<p>
An indentation standard using spaces never was achieved. Some people like 2 spaces, some prefer 4 and
others die for 8, or even more spaces. Better use tabs. Tab characters have some advantages:
</p>
<li>Everyone can set their own preferred indentation level
<li>It is only 1 character and not 2, 4, 8 … therefore it will reduce typing (even with
smartindenting you have to set the indentation manually sometimes, or take it back or
whatever)
<li>If you want to increase the indentation (or decrease), mark one block and increase the
indent level with Tab with Shift-Tab you decrease the indentation. This is true for almost
any texteditor.
<p>
Here, we define the Tab as the standard indentation character.
</p>
<h2><center>Don't use spaces for indentation - use tabs!</center></h2>

<a name="4"></a><h1>4.  Comments</h1>
<h3>4.1 Block Comments</h3>
<p>Block comments should usually be avoided. For descriptions use of the /// comments to give C# standard
descriptions is recommended. When you wish to use block comments you should use the following style :
</p>
<pre><code>
/* Line 1
* Line 2
* Line 3
*/
</code>
</pre>
<p>
As this will set off the block visually from code for the (human) reader. Alternatively you might use this
oldfashioned C style for single line comments, even though it is not recommended. In case you use this
style, a line break should follow the comment, as it is hard to see code preceeded by comments in the same
line:
</p>
<pre><code>
/* blah blah blah */
</code></pre>
<p>
Block comments may be useful in rare cases, refer to the TechNote 'The fine Art of Commenting' for an
example. Generally block comments are useful for comment out large sections of code.
</p>
<h3>4.2 Single Line Comments</h3>
<p>You should use the // comment style to "comment out" code (SharpDevelop has a key for it, Alt+/) . It may
be used for commenting sections of code too.
</p>
<p>
Single line comments must be indented to the indent level when they are used for code documentation.
Commented out code should be commented out in the first line to enhance the visibility of commented out
code.
</p>
<p>
A rule of thumb says that generally, the length of a comment should not exceed the length of the code
explained by too much, as this is an indication of too complicated, potentially buggy, code.
</p>
<h3>4.3 Documentation Comments</h3>
<p>In the .net framework, Microsoft has introduced a documentation generation system based on XML
comments. These comments are formally single line C# comments containing XML tags. They follow this
pattern for single line comments:
</p>
<pre><code>
/// &lt;summary&gt;
/// This class...
/// &lt;/summary&gt;
</code></pre>
<p>Multiline XML comments follow this pattern:</p>
<pre><code>
/// &lt;exception cref=”BogusException”&gt;
/// This exception gets thrown as soon as a
/// Bogus flag gets set.
/// &lt;/exception&gt;
</code></pre>
<p>
All lines must be preceded by three slashes to be accepted as XML comment lines.
Tags fall into two categories:
</p>
<li>Documentation items
<li>Formatting/ Referencing
<p>The first category contains tags like &lt;summary&gt;, &lt;param&gt; or &lt;exception&gt;.  These represent items that represent the elements of a program's API which must be documented for the program to be useful to other programmers. These tags usually have attributes such as name or cref as demonstrated in the multiline example above. These attributes are checked by the compiler, so they should be valid. The latter category governs the layout of the documentation, using tags such as &lt;code&gt;, &lt;list&gt; or &lt;para&gt;.<br>
Documentation can then be generated using the 'documentation' item in the #develop 'build' menu. The
documentation generated is in HTMLHelp format.<br>
For a fuller explanation of XML comments see the Microsoft .net framework SDK documentation. For
information on commenting best practice and further issues related to commenting, see the TechNote 'The
fine Art of Commenting'.
</p>

<a name="5"></a><h1>5. Declarations</h1>
<h3>5.1 Number of Declarations per Line</h3>
<p>One declaration per line is recommended since it encourages commenting1. In other words,
<pre><code>
int level; // indentation level
int size; // size of table
</code></pre>
<p>Do not put more than one variable or variables of different types on the same line when declaring them.
Example:
<pre><code>
int a, b; //What is 'a'? What does 'b' stand for?
</code></pre>
<p>The above example also demonstrates the drawbacks of non-obvious variable names. Be clear when naming
variables.
<h3>5.2 Initialization</h3>
Try to initialize local variables as soon as they are declared. For example:
<pre><code>
string name = myObject.Name;
</code></pre>
or
<pre><code>
int val = time.Hours;
</code></pre>
Note: If you initialize a dialog try to use the using statement:
<pre><code>
using (OpenFileDialog openFileDialog = new OpenFileDialog()) {
...
}
</code></pre>
<h3>5.3 Class and Interface Declarations</h3>
<p>When coding C# classes and interfaces, the following formatting rules should be followed:
<li>No space between a method name and the parenthesis " (" starting its parameter list.
<li>The opening brace "{" appears in the next line after the declaration statement
<li>The closing brace "}" starts a line by itself indented to match its corresponding opening brace.
<p>
For example:
</p>
<pre><code>
Class MySample : MyClass, IMyInterface
{
	int myInt;
	public MySample(int myInt)
	{
	this.myInt = myInt ;
	}
	void Inc()
	{
		++myInt;
	}
	void EmptyMethod()
	{
	}
}
</code></pre>
<p>For a brace placement example look at section 10.1.</p>

<a name="6"></a><h1>6. Statements</h1>
<h3>6.1 Simple Statements</h3>
<p>Each line should contain only one statement.
<h3>6.2 Return Statements</h3>
<p>A return statement should not use outer most parentheses.
Don't use : 
</p>
<pre><code>
return (n * (n + 1) / 2);
use : return n * (n + 1) / 2;
</code></pre>
<h3>6.3 If, if-else, if else-if else Statements</h3>
<p>if, if-else and if else-if else statements should look like this:
<pre><code>
if (condition) {
DoSomething();
...
}
if (condition) {
DoSomething();
...
} else {
DoSomethingOther();
...
}
if (condition) {
DoSomething();
...
} else if (condition) {
DoSomethingOther();
...
} else {
DoSomethingOtherAgain();
...
}
</code></pre>
<h3>6.4 For / Foreach Statements</h3>
A for statement shoud have following form :
<pre><code>
for (int i = 0; i < 5; ++i) {
...
}
</code></pre>
or single lined (consider using a while statement instead) :
<pre><code>
for (initialization; condition; update) ;
A foreach should look like :
foreach (int i in IntList) {
...
}
</code></pre>
Note: Generally use brackets even if there is only one statement in the loop.
<h3>6.5 While/do-while Statements</h3>
A while statement should be written as follows:
<pre><code>
while (condition) {
...
}
</code></pre>
<p>An empty while should have the following form:
<pre><code>
while (condition) ;
</code></pre>
A do-while statement should have the following form:
<pre><code>
do {
...
} while (condition);
</code></pre>
<h3>6.6 Switch Statements</h3>
A switch statement should be of following form:
<pre><code>
switch (condition) {
case A:
...
break;
case B:
...
break;
default:
...
break;
}
</code></pre>
<h3>6.7 Try-catch Statements</h3>
<p>A try-catch statement should follow this form:
<pre><code>
try {
...
} catch (Exception) {}
or
try {
...
} catch (Exception e) {
...
}
or
try {
...
} catch (Exception e) {
...
} finally {
...
}
</code></pre>



<a name="7"></a><h1>7. White Space</h1>
<h3>7.1 Blank Lines</h3>
<p>Blank lines improve readability. They set off blocks of code which are in themselves logically related.
Two blank lines should always be used between:
</p>
<li>Logical sections of a source file
<li>Class and interface definitions (try one class/interface per file to prevent this case)
One blank line should always be used between:
<li>Methods
<li>Properties
<li>Local variables in a method and its first statement
<li>Logical sections inside a method to improve readability
Note that blank lines must be indented as they would contain a statement this makes insertion in these lines
much easier.
<h3>7.2 Inter-term spacing</h3>
There should be a single space after a comma or a semicolon, for example:
<pre><code>
TestMethod(a, b, c); don't use : TestMethod(a,b,c)
</code></pre>
or
<pre><code>
TestMethod( a, b, c );
Single spaces surround operators (except unary operators like increment or logical not), example:
a = b; // don't use a=b;
for (int i = 0; i < 10; ++i) // don't use for (int i=0; i<10; ++i)
// or
// for(int i=0;i<10;++i)
</code></pre>


<h3>7.3 Table like formatting</h3>
<p>A logical block of lines should be formatted as a table:</p>
<pre><code>
string name = "Mr. Ed";
int myValue = 5;
Test aTest = Test.TestYou;
</code></pre>
<p>
Use spaces for the table like formatting and not tabs because the table formatting may look strange in
special tab intent levels.
</p>
<a name="8"></a><h1>8. Naming Conventions</h1>
<h3>8.1 Capitalization Styles</h3>
<h3>8.1.1 Pascal Casing</h3>
<p>This convention capitalizes the first character of each word (as in TestCounter).</p>
<h3>8.1.2 Camel Casing</h3>
<p>This convention capitalizes the first character of each word except the first one. E.g. testCounter.
<h3>8.1.3 Upper case</h3>
<p>Only use all upper case for identifiers if it consists of an abbreviation which is one or two characters long,
identifiers of three or more characters should use Pascal Casing instead. For Example:
</p>
<pre><code>
public class Math
{
public const PI = ...
public const E = ...
public const feigenBaumNumber = ...
}
</code></pre>
<h3>8.2. Naming Guidelines</h3>
<p>Generally the use of underscore characters inside names and naming according to the guidelines for
Hungarian notation are considered bad practice.
<p>
Hungarian notation is a defined set of pre and postfixes which are applied to names to reflect the type of the
variable. This style of naming was widely used in early Windows programming, but now is obsolete or at
least should be considered deprecated. Using Hungarian notation is not allowed if you follow this guide.
<p>
And remember: a good variable name describes the semantic not the type.
<p>An exception to this rule is GUI code. All fields and variable names that contain GUI elements like button
should be postfixed with their type name without abbreviations. For example:
</p>
<pre><code>
System.Windows.Forms.Button cancelButton;
System.Windows.Forms.TextBox nameTextBox;
</code></pre>
<h3>8.2.1 Class Naming Guidelines</h3>
<li>Class names must be nouns or noun phrases.
<li>UsePascal Casing see 8.1.1
<li>Do not use any class prefix
<h3>8.2.2 Interface Naming Guidelines</h3>
<li>Name interfaces with nouns or noun phrases or adjectives describing behavior. (Example IComponent
or IEnumberable)
<li>Use Pascal Casing (see 8.1.1)
<li>Use I as prefix for the name, it is followed by a capital letter (first char of the interface name)
<h3>8.2.3 Enum Naming Guidelines</h3>
<li>Use Pascal Casing for enum value names and enum type names
<li>Don’t prefix (or suffix) a enum type or enum values
<li>Use singular names for enums
<li>Use plural name for bit fields.

<h3>8.2.4 ReadOnly and Const Field Names</h3>
<li>Name static fields with nouns, noun phrases or abbreviations for nouns
<li>Use Pascal Casing (see 8.1.1)
<h3>8.2.5 Parameter/non const field Names</h3>
<li>Do use descriptive names, which should be enough to determine the variable meaning and it’s type. But
prefer a name that’s based on the parameter’s meaning.
<li>Use Camel Casing (see 8.1.2)
<h3>8.2.6 Variable Names</h3>
<li>Counting variables are preferably called i, j, k, l, m, n when used in 'trivial' counting loops.
(see 10.2 for an example on more intelligent naming for global counters etc.)
<li>Use Camel Casing (see 8.1.2)
<h3>8.2.7 Method Names</h3>
<li>Name methods with verbs or verb phrases.
<li>Use Pascal Casing (see 8.1.2)
<h3>8.2.8 Property Names</h3>
<li>Name properties using nouns or noun phrases
<li>Use Pascal Casing (see 8.1.2)
<li>Consider naming a property with the same name as it’s type
<h3>8.2.9 Event Names</h3>
<li>Name event handlers with the EventHandler suffix.
<li>Use two parameters named sender and e
<li>Use Pascal Casing (see 8.1.1)
<li>Name event argument classes with the EventArgs suffix.
<li>Name event names that have a concept of pre and post using the present and past tense.
<li>Consider naming events using a verb.
<h3>8.2.10 Capitalization summary</h3>
<table border=1>
<tr><td>Type</td><td>Case</td><td>Notes</td><td></tr>
<tr><td>Class / Struct</td><td> Pascal Casing</td><td>&nbsp;</td></tr>
<tr><td>Interface</td><td>Pascal Casing</td><td> Starts with I</td></tr>
<tr><td>Enum values</td><td> Pascal Casing</td><td>&nbsp;</td></tr>
<tr><td>Enum type</td><td> Pascal Casing</td><td>&nbsp;</td></tr>
<tr><td>Events</td><td> Pascal Casing</td><td>&nbsp;</td></tr>
<tr><td>Exception class</td><td> Pascal Casing</td><td> End with Exception</td></tr>
<tr><td>public Fields</td><td> Pascal Casing</td><td>&nbsp;</td></tr>
<tr><td>Methods</td><td> Pascal Casing</td><td>&nbsp;</td></tr>
<tr><td>Namespace</td><td> Pascal Casing</td><td>&nbsp;</td></tr>
<tr><td>Property</td><td> Pascal Casing</td><td>&nbsp;</td></tr>
<tr><td>Protected/private Fields</td><td> Camel Casing</td><td>&nbsp;</td></tr>
<tr><td>Parameters</td><td> Camel Casing</td><td>&nbsp;</td></tr>
</table>




<a name="9"></a><h1>9. Programming Practices</h1>
<h3>9.1 Visibility</h3>
<p>
Do not make any instance or class variable public, make them private. For private members prefer not
using “private” as modifier just do write nothing. Private is the default case and every C# programmer
should be aware of it.
</p>
<p>
Use properties instead. You may use public static fields (or const) as an exception to this rule, but
it should not be the rule.
</p>
<h3>9.2 No 'magic' Numbers</h3>
<p>
Don’t use magic numbers, i.e. place constant numerical values directly into the source code. Replacing these
later on in case of changes (say, your application can now handle 3540 users instead of the 427 hardcoded
into your code in 50 lines scattered troughout your 25000 LOC) is error-prone and unproductive. Instead
declare a const variable which contains the number :
</p>
<pre><code>
public class MyMath
{
public const double PI = 3.14159...
}
</code></pre>

<a name="10"></a><h1>10.  Code Examples</h1>
<h3>10.1 Brace placement example</h3>
<pre><code>
namespace ShowMeTheBracket
{
public enum Test {
TestMe,
TestYou
}
public class TestMeClass
{
Test test;
public Test Test {
get {
return test;
}
set {
test = value;
}
}
void DoSomething()
{
if (test == Test.TestMe) {
//...stuff gets done
} else {
//...other stuff gets done
}
}
}
}
</code></pre>
Brackets should begin on a new line only after:
<li>Namespace declarations (note that this isnew in version 0.3 and was different in 0.2)
<li>Class/ Interface / Struct declarations
<li>Method Declarations


<h3>10.2 Variable naming example</h3>
instead of :
<pre><code>
for (int i = 1; i < num; ++i) {
meetsCriteria[i] = true;
}
for (int i = 2; i < num / 2; ++i) {
int j = i + i;
while (j <= num) {
meetsCriteria[j] = false;
j += i;
}
}
for (int i = 0; i < num; ++i) {
if (meetsCriteria[i]) {
Console.WriteLine(i + " meets criteria");
}
}
try intelligent naming :
for (int primeCandidate = 1; primeCandidate < num; ++primeCandidate)
{
isPrime[primeCandidate] = true;
}
for (int factor = 2; factor < num / 2; ++factor) {
int factorableNumber = factor + factor;
while (factorableNumber <= num) {
isPrime[factorableNumber] = false;
factorableNumber += factor;
}
}
for (int primeCandidate = 0; primeCandidate < num; ++primeCandidate)
{
if (isPrime[primeCandidate]) {
Console.WriteLine(primeCandidate + " is prime.");
}
}
</code></pre>
<p>
Note: Indexer variables generally should be called i, j, k etc. But in cases like this, it
may make sense to reconsider this rule. In general, when the same counters or indexers are
reused, give them meaningful names.</p>
				</DIV>
			</span>
		</td>
	</tr>
	<tr>
		<td><br>
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tr>
					<td align="left" width="33%"></td>
					<td align="center" width="33%"><b>1</b>&nbsp;</td>
					<td align="right" width="33%">
					</td>
				</tr>
			</table>
			<hr>
			<p align="center"><a href="http://www.sitepoint.com/launch/d0b6092/3/8" target="_blank"><img src="/books/images/photo-left-thb-new2.gif" border="0"></a><br>
				<a href="http://www.sitepoint.com/launch/d0b6092/3/8" target="_blank">Build Your 
					Own ASP.NET Website Using C# & VB.NET</a></p>		
		
		</td>
	</tr>
</table>
<!-- toc -->
<table width="100%">
	<tr bgcolor="#ffffee">
		<td align="center" width="50%"><font face="verdana" size="2">Chapter:&nbsp;
				<a href="http://www.csharpfriends.com/Articles/getbycat.aspx?catID=36">Style & Naming Conventions</a><br>
				Current Lesson:<br>
				<b>
					C# Coding Style Guide</b></font></td>
		<td width="50%"><font face="verdana" size="2">[<A href="http://www.csharpfriends.com/Members/Main/Tutorials/">Latest 
					Content</A>]<br>
				<span id="Showallusers1__ctl0_AlphaPicker">
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=A">A</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=B">B</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=C">C</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=D">D</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=E">E</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=F">F</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=G">G</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=H">H</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=I">I</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=J">J</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=K">K</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=L">L</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=M">M</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=N">N</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=O">O</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=P">P</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=Q">Q</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=R">R</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=S">S</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=T">T</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=U">U</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=V">V</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=W">W</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=X">X</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=Y">Y</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="/Members/Main/Tutorials/get_letter.aspx?letter=Z">Z</a><span class="normalTextSmallBold"> | </span>
					<a class="linkSmallBold" href="http://www.csharpfriends.com/Articles/GetAllArticles.aspx">
						ALL</a><span class="normalTextSmallBold"></span>
				</span></font></td>
	</tr>
	<tr bgcolor="#eeeeee">
		<td width="50%"><font face="verdana" size="2"><A href="http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=335">[prev. Lesson]&nbsp;&nbsp;Creating GUIDs in c#</a></font></td>
		<td width="50%"><font face="verdana" size="2"><A href="http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=344">[next Lesson]&nbsp;&nbsp;Password Hashing using C#</a></font></td>
	</tr>
</table>
<!-- end toc --></span>
			<!-- 
			<SCECommentView runate"server" id="CommentView1" />
			-->
		</form>
	</td>
	<!-- /CONTENT -->
<span id="Footer1">
<td width="134"><!-- right -->
	<table width="100%" cellpadding="3" cellspacing="0" border="0">
		<tr>
			<td>
			<!--
				<TABLE border="0" width="130" cellpadding="1" cellspacing="0" bgcolor="#cccc99">
					<TR>
						<TD width="100%"><TABLE width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#cccc99">
								<TR>
									<TD valign="middle" align="center" bgcolor="#eeeecc">
										<a href="/members/main/misc/advertise.aspx"><b class="small">Sponsors</a></b>
									</TD>
								</TR>
								<TR>
									<TD bgcolor="#ffffff" valign="top" width="100%" align="center">
										<script language="JavaScript" src="http://www.csharpfriends.com/AdServer/abm.asp?z=6"></script>
										<br />
										<script language="JavaScript" src="http://www.csharpfriends.com/AdServer/abm.asp?z=7"></script>
									</TD>
								</TR>
							</TABLE>
						</TD>
					</TR>
				</TABLE>
				
				<p align="center"><iframe src="http://www.csharpfriends.com/AdServer/abmw.asp?z=4&isframe=true" width="125"
						height="125" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe></p>
				-->
<p align="center">
<!--  Ad Serving by - http://www.idealadserver.com  -->
<script language="JavaScript" type="text/javascript">
<!--

var oCp = parent.location.href;
var dtBrowser = (new Date()).getTime();

document.write('<iframe name="IdealAdServer_frame" width="125" height="125" frameborder="0" src="http://www.csharpfriends.com/IdealAdServer/IdealAdServer.aspx?pid=2&zid=3&a=1&ocp=' + oCp + '&' + dtBrowser +'" marginwidth="0"	marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"></iframe>');
 
 

// --> 
</script>
</p>
<!--  Ad Serving by - http://www.idealadserver.com  --><script language="JavaScript" type="text/javascript">
<!--

var oCp = parent.location.href;
var dtBrowser = (new Date()).getTime();

document.write('<iframe name="IdealAdServer_frame" width="125" height="125" frameborder="0" src="http://www.csharpfriends.com/IdealAdServer/IdealAdServer.aspx?pid=2&zid=8&a=1&ocp=' + oCp + '&' + dtBrowser +'" marginwidth="0"	marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"></iframe>');
 
 

// --> 
</script>

<br />
								<br>

				<TABLE border="0" width="130" cellpadding="1" cellspacing="0" bgcolor="#cccc99">
					<TR>
						<TD width="100%"><TABLE width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#cccc99">
								<TR>
									<TD valign="middle" align="center" bgcolor="#eeeecc">
										<font color="#CC6600"><b class="small">Today's Top Movers</b></font>
									</TD>
								</TR>
								<TR>
									<TD bgcolor="#ffffff" valign="top" width="100%" align="center">
										<span class="serif">
											<a href="/Forums/User/UserProfile.aspx?UserName=vulpes">vulpes</a>&nbsp;<font size=-2>3277</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=MadHatter">MadHatter</a>&nbsp;<font size=-2>2020</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=jal">jal</a>&nbsp;<font size=-2>617</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=muster">muster</a>&nbsp;<font size=-2>604</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=Jeff1203">Jeff1203</a>&nbsp;<font size=-2>462</font><br/>
										</span>
									</TD>
								</TR>
							</TABLE>
						</TD>
					</TR>
				</TABLE>
				<br clear="all">				
				<TABLE border="0" width="130" cellpadding="1" cellspacing="0" bgcolor="#cccc99">
					<TR>
						<TD width="100%"><TABLE width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#cccc99">
								<TR>
									<TD valign="middle" align="center" bgcolor="#eeeecc">
										<font color="#CC6600"><b class="small">Yesterday Top Movers</b></font>
									</TD>
								</TR>
								<TR>
									<TD bgcolor="#ffffff" valign="top" width="100%" align="center">
										<span class="serif">
											<a href="/Forums/User/UserProfile.aspx?UserName=shakti singh tanwar">shakti sin..</a>&nbsp;<font size=-2>9</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=MadHatter">MadHatter</a>&nbsp;<font size=-2>3</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=Al_Pennyworth">Al_Pennywo..</a>&nbsp;<font size=-2>2</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=C#fanatic">C#fanatic</a>&nbsp;<font size=-2>2</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=simboy">simboy</a>&nbsp;<font size=-2>1</font><br/>
										</span>
									</TD>
								</TR>
							</TABLE>
						</TD>
					</TR>
				</TABLE>
				<br clear="all">
				<!--  Ad Serving by - http://www.idealadserver.com  --><script language="JavaScript" type="text/javascript">
<!--

var oCp = parent.location.href;
var dtBrowser = (new Date()).getTime();

document.write('<iframe name="IdealAdServer_frame" width="125" height="125" frameborder="0" src="http://www.csharpfriends.com/IdealAdServer/IdealAdServer.aspx?pid=2&zid=8&a=1&ocp=' + oCp + '&' + dtBrowser +'" marginwidth="0"	marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"></iframe>');
 
 

// --> 
</script>

				<br />
				<br clear="all">
				<TABLE border="0" width="130" cellpadding="1" cellspacing="0" bgcolor="#cccc99">
					<TR>
						<TD width="100%"><TABLE width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#cccc99">
								<TR>
									<TD valign="middle" align="center" bgcolor="#eeeecc">
										<font color="#CC6600"><b class="small">Monthly Leaders</b></font>
									</TD>
								</TR>
								<TR>
									<TD bgcolor="#ffffff" valign="top" width="100%" align="center">
										<span class="serif">
											<a href="/Forums/User/UserProfile.aspx?UserName=vulpes">vulpes</a>&nbsp;<font size=-2>3277</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=MadHatter">MadHatter</a>&nbsp;<font size=-2>2060</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=jal">jal</a>&nbsp;<font size=-2>617</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=muster">muster</a>&nbsp;<font size=-2>604</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=Jeff1203">Jeff1203</a>&nbsp;<font size=-2>462</font><br/>
										</span>
									</TD>
								</TR>
							</TABLE>
						</TD>
					</TR>
				</TABLE>
				<br clear="all">
				<TABLE border="0" width="130" cellpadding="1" cellspacing="0" bgcolor="#cccc99">
					<TR>
						<TD width="100%"><TABLE width="100%" border="0" cellpadding="4" cellspacing="0" bgcolor="#cccc99">
								<TR>
									<TD valign="middle" align="center" bgcolor="#eeeecc">
										<font color="#CC6600"><b class="small">Top Members</b></font>
									</TD>
								</TR>
								<TR>
									<TD bgcolor="#ffffff" valign="top" width="100%" align="center">
										<span class="serif">
											<a href="/Forums/User/UserProfile.aspx?UserName=mosessaur">mosessaur</a>&nbsp;<font size=-2>18457</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=Rincewind">Rincewind</a>&nbsp;<font size=-2>7074</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=stanleytan">stanleytan</a>&nbsp;<font size=-2>6995</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=Gsuttie">Gsuttie</a>&nbsp;<font size=-2>6046</font><br/><a href="/Forums/User/UserProfile.aspx?UserName=juliet">juliet</a>&nbsp;<font size=-2>4679</font><br/>
										</span>
									</TD>
								</TR>
							</TABLE>
						</TD>
					</TR>
				</TABLE>				
				<br clear="all">
				<!-- great  -->
				<table bgcolor="#FDFFCA" border="0" cellspacing="0" width="125" style="border: 1px dashed #7755AA; background-color: #ecf8ff;"
					align="center">
					<tr>
						<td align="center">
							<table border="0" cellpadding="3" cellspacing="0" width="125">
								<tr>
									<td class="ch" bgcolor="#FDFFCA" nowrap><font color="#ce0000" face="arial" size="-1">Great 
											Offers</font><br>
										<font face="arial" color="black" size="-2">
											<a href="http://www.csharpfriends.com/statics/asp.net-hosting.aspx">.net hosting</a>							

											<br>											
											<a href="http://www.csharpfriends.com/statics/go-to-my-pc.aspx">Go To My Pc</a>
											<br>
											<a href="http://www.csharpfriends.com/free/remote-control-pc.aspx">Remote Pc Control</a>
											<br>
											<a href="http://www.csharpfriends.com/free/zonealarm.aspx">zonealarm</a>
											<br/>
											<a href="http://www.csharpfriends.com/statics/spam-blocker.aspx">spam blocker</a>
											<br>
											<a href="http://www.webhostingfriends.com">web hosting directory</a>
											<br>
											<a href="http://www.csharpfriends.com/statics/ad-server.aspx">ad server</a> &nbsp;
											<a href="http://www.csharpfriends.com/statics/csharp.aspx">C#</a>
											<br>
											<a href="http://www.snadtech.com">snadtech</a>&nbsp;<a href="http://www.csharpfriends.com/statics/gotomypc.aspx">GoToMyPc</a>
											
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
				<!-- /great  -->
				<br />

			</td>
		</tr>
	</table>
</td> <!-- /right nav -->
</tr> </table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
		<td align="center">
<!--  Ad Serving by - http://www.idealadserver.com  -->
<script language="JavaScript" type="text/javascript">
<!--

var oCp = parent.location.href;
var dtBrowser = (new Date()).getTime();

document.write('<iframe name="IdealAdServer_frame" width="468" height="60" frameborder="0" src="http://www.csharpfriends.com/IdealAdServer/IdealAdServer.aspx?pid=2&zid=7&a=1&ocp=' + oCp + '&' + dtBrowser +'" marginwidth="0"	marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no"></iframe>');
 
 

// --> 
</script>
</td>
		
	</tr>
</table>
<!-- footer -->

<table width="100%">
	<tr>
		<td width="50%" valign="top" align="left" class="small">
			<a href="#top">Top of Page</a>
		</td>
	</tr>
</table>
<center>
	<p>
		<div class="tiny" align="center">
			<A HREF="http://www.csharpfriends.com/Members/Main/Misc/advertise.aspx">
				Advertise</A> | <A HREF="http://www.csharpfriends.com/Members/Main/Misc/about.aspx">
				About</A> | <A HREF="http://www.csharpfriends.com/Members/Main/Misc/LinkToUs.aspx">
				Link To Us</A> | <A HREF="http://www.csharpfriends.com/Members/Main/Misc/private.aspx">
				Privacy Notice</A>&nbsp;Copyright &copy; 2003 - 2005
				CSharpFriends.com&nbsp;&nbsp;All Rights Reserved &nbsp;<a href="http://msdn.microsoft.com/vcsharp/default.aspx">Visual C# Developer Center</a>
		</div>
</center>
<table border="0" cellpadding="2" cellspacing="0" width="100%">
	<tr>
		<td>
			<hr noshade size="6" color="#7755AA">
		</td>
	</tr>	
</table>
<!-- /footer -->
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-252131-1";
urchinTracker();
</script>
<!-- Kontera ContentLink™ -->
<script type="text/javascript">
var dc_UnitID = 14;
var dc_PublisherID = 42692;
var dc_AdLinkColor = 'blue';
var dc_adprod='ADL';
</script>
<script type="text/javascript" SRC="http://kona.kontera.com/javascript/lib/KonaLibInline.js"></script>
<!-- Kontera ContentLink™ -->
</body> </html></span>